package com.shop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.shop.dao.CategoryDao;
import com.shop.domain.Category;
import com.shop.service.CategoryService;

/**
 * 
 * @author wenjuanhenxing
 * @version V1.0 CategoryServiceImpl.java 2016-2-14 上午2:31:17
 */
@Service("categoryServiceImpl")
public class CategoryServiceImpl implements CategoryService {

	@Resource(name = "categoryDaoImpl")
	private CategoryDao categoryDao;

	@Override
	public boolean addCategory(Category category) {
		return categoryDao.addCategory(category);
	}

	@Override
	public boolean deleteCategoryById(Long id) {
		return categoryDao.deleteCategoryById(id);
	}

	@Override
	public boolean deleteCategoryByName(String name) {
		return categoryDao.deleteCategoryByName(name);
	}

	@Override
	public Long getIdByCategoryName(String name) {
		return categoryDao.getIdByCategoryName(name);
	}

	@Override
	public boolean updateCategoryName(Category category) {
		return categoryDao.updateCategoryName(category);
	}

	@Override
	public List<Category> getSubCategory(Long id) {
		return categoryDao.getSubCategory(id);
	}

	@Override
	public List<Category> getLargeCategory() {
		return categoryDao.getLargeCategory();
	}

}
